<?php namespace system\database\migrations;
use houdunwang\database\build\Migration;
use houdunwang\database\build\Blueprint;
use houdunwang\database\Schema;
class CreateSlideTable extends Migration {
    //执行
	public function up() {
		Schema::create( 'slide', function ( Blueprint $table ) {
			$table->increments( 'slide_id' );
			$table->timestamps();
			$table->string( 'slide_title' )->defaults('')->comment('幻灯片标题');
			$table->string( 'slide_linkurl' )->defaults('')->comment('幻灯片跳转连接');
			$table->tinyInteger( 'slide_orderby' )->defaults(0)->comment('幻灯片排序');
			$table->string( 'slide_thumb' )->defaults('')->comment('幻灯缩略图');
        });
    }

    //回滚
    public function down() {
        Schema::drop( 'slide' );
    }
}